package org.begincode.course.handler;

import org.begincode.core.model.Course;
import org.begincode.core.model.CourseLabel;
import org.begincode.core.model.CourseLevel;
import org.begincode.core.model.CourseType;
import org.begincode.course.service.CourseService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by yangsj on 2016/4/30.
 */
@Component
public class CourseHandler {
    @Resource
    private CourseService courseService;

    public Course getCourseById(Integer courseId){
       return courseService.selectCourseById(courseId);
    }

    public List<Course> getCourses(){
       return  courseService.selectCourses();
    }

    public List<CourseLabel> getCourseLabels(){
        return courseService.selectLabels();
    }
    public List<CourseLevel> getCourseLevels(){
        return courseService.selectCourseLevels();
    }
    public List<CourseType> getCourseTypes(){
        return courseService.selectCourseTypes();
    }
}
